<?php
namespace Futures\Controller;
use Futures\Model\OrderModel;
use Think\Controller;
/**
 *  自动更新执行的控制器
 */
class GuideController extends Controller{

    public function index(){
    	$where = array('category_id' => '47','status' => '1');
    	//获取标题
		$list = M('document')->where($where)->field('id,title,cover_id')->select();
		$this->assign('list',$list);
        $this->display();
    }

    public function guide_detail(){
    	//查询标题内容
		$id = $_GET['id'];
		$list = M('document_article')->table('wp_document_article as a')->join('wp_document as b on a.id=b.id')
		->where('a.id='.$id)->field('a.content,b.title')->find();
		$this->assign('list',$list);
        $this->display();
    }
}